package com.ruoyi.vehicleDispatch.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.vehicleDispatch.mapper.DispatchIntervalRuleMapper;
import com.ruoyi.vehicleDispatch.domain.DispatchIntervalRule;
import com.ruoyi.vehicleDispatch.service.IDispatchIntervalRuleService;

/**
 * 派单间隔规则Service业务层处理
 * 
 * @author niuyi
 * @date 2025-08-19
 */
@Service
public class DispatchIntervalRuleServiceImpl implements IDispatchIntervalRuleService 
{
    @Autowired
    private DispatchIntervalRuleMapper dispatchIntervalRuleMapper;

    /**
     * 查询派单间隔规则
     * 
     * @param ruleId 派单间隔规则主键
     * @return 派单间隔规则
     */
    @Override
    public DispatchIntervalRule selectDispatchIntervalRuleByRuleId(Integer ruleId)
    {
        return dispatchIntervalRuleMapper.selectDispatchIntervalRuleByRuleId(ruleId);
    }

    /**
     * 查询派单间隔规则列表
     * 
     * @param dispatchIntervalRule 派单间隔规则
     * @return 派单间隔规则
     */
    @Override
    public List<DispatchIntervalRule> selectDispatchIntervalRuleList(DispatchIntervalRule dispatchIntervalRule)
    {
        return dispatchIntervalRuleMapper.selectDispatchIntervalRuleList(dispatchIntervalRule);
    }

    /**
     * 新增派单间隔规则
     * 
     * @param dispatchIntervalRule 派单间隔规则
     * @return 结果
     */
    @Override
    public int insertDispatchIntervalRule(DispatchIntervalRule dispatchIntervalRule)
    {
        return dispatchIntervalRuleMapper.insertDispatchIntervalRule(dispatchIntervalRule);
    }

    /**
     * 修改派单间隔规则
     * 
     * @param dispatchIntervalRule 派单间隔规则
     * @return 结果
     */
    @Override
    public int updateDispatchIntervalRule(DispatchIntervalRule dispatchIntervalRule)
    {
        return dispatchIntervalRuleMapper.updateDispatchIntervalRule(dispatchIntervalRule);
    }

    /**
     * 批量删除派单间隔规则
     * 
     * @param ruleIds 需要删除的派单间隔规则主键
     * @return 结果
     */
    @Override
    public int deleteDispatchIntervalRuleByRuleIds(Integer[] ruleIds)
    {
        return dispatchIntervalRuleMapper.deleteDispatchIntervalRuleByRuleIds(ruleIds);
    }

    /**
     * 删除派单间隔规则信息
     * 
     * @param ruleId 派单间隔规则主键
     * @return 结果
     */
    @Override
    public int deleteDispatchIntervalRuleByRuleId(Integer ruleId)
    {
        return dispatchIntervalRuleMapper.deleteDispatchIntervalRuleByRuleId(ruleId);
    }
}
